package com.trg.generaltool.service.rabbitmq.conform.direct;

import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @ClassName: Customer1
 * @Description:    消费者
 * @Author: tangrg
 * @Date: 2021/7/19 15:03
 * @Version: 1.0
 * @Return:
 **/
@Component
@RabbitListener(queuesToDeclare = @Queue(value = "Springboot test"))
public class Customer1 {

    @RabbitHandler
    public void receive(String msg){
        System.out.println(msg);
    }

}
